package com.szgz.platform.model;

import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;

@TableName("tasks")
public class Task {

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	@TableField("task_id")
	private String taskId;

	@TableField("title")
	private String title;

	@TableField("description")
	private String description;

	@TableField("type")
	private String type; // coding | quiz | project | reading

	@TableField("difficulty")
	private String difficulty; // easy | medium | hard

	@TableField("estimated_time")
	private Integer estimatedTime; // 单位：分钟

	@TableField("deadline")
	private LocalDateTime deadline;

	@TableField("status")
	private String status; // draft | published | archived

	@TableField("creator_id")
	private String creatorId;

	@TableField("created_at")
	private LocalDateTime createdAt;

	@TableField("updated_at")
	private LocalDateTime updatedAt;

	@TableLogic
	@TableField("deleted")
	private Integer deleted;

	public Task() {
		this.createdAt = LocalDateTime.now();
		this.updatedAt = LocalDateTime.now();
		this.status = "draft";
		this.deleted = 0;
	}

	public Long getId() { return id; }
	public void setId(Long id) { this.id = id; }
	public String getTaskId() { return taskId; }
	public void setTaskId(String taskId) { this.taskId = taskId; }
	public String getTitle() { return title; }
	public void setTitle(String title) { this.title = title; }
	public String getDescription() { return description; }
	public void setDescription(String description) { this.description = description; }
	public String getType() { return type; }
	public void setType(String type) { this.type = type; }
	public String getDifficulty() { return difficulty; }
	public void setDifficulty(String difficulty) { this.difficulty = difficulty; }
	public Integer getEstimatedTime() { return estimatedTime; }
	public void setEstimatedTime(Integer estimatedTime) { this.estimatedTime = estimatedTime; }
	public LocalDateTime getDeadline() { return deadline; }
	public void setDeadline(LocalDateTime deadline) { this.deadline = deadline; }
	public String getStatus() { return status; }
	public void setStatus(String status) { this.status = status; }
	public String getCreatorId() { return creatorId; }
	public void setCreatorId(String creatorId) { this.creatorId = creatorId; }
	public LocalDateTime getCreatedAt() { return createdAt; }
	public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
	public LocalDateTime getUpdatedAt() { return updatedAt; }
	public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
	public Integer getDeleted() { return deleted; }
	public void setDeleted(Integer deleted) { this.deleted = deleted; }
}

